package com.sg.dto.integration.framework;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

@Data
public class BeginMemberDto extends BaseDto implements Serializable {

    /**
     * 身份人员ID:
     */
    @ApiModelProperty("身份人员ID")
    private String originalRoleMemberId;

    /**
     * 账号ID:
     */
    @ApiModelProperty("账号ID")
    private String userId;

    /**
     * 真实姓名:
     */
    @ApiModelProperty("真实姓名")
    private String idCardName;

    /**
     * 用户昵称:
     */
    @ApiModelProperty("用户昵称")
    private String nickName;

    /**
     * 职务信息展示:
     */
    @ApiModelProperty("职务信息展示")
    private String positionIdName;

    /**
     * 真实头像:
     */
    @ApiModelProperty("真实头像")
    private String userFace;

    /**
     * 备注首位字母:
     */
    @ApiModelProperty("备注首位字母")
    private String firstLetter;

    /**
     * 是否失效:
     */
    @ApiModelProperty("是否失效")
    private String isInvalid;

    /**
     * 身份人员编号:
     */
    @ApiModelProperty("身份人员编号")
    private String roleMemberCode;

    /**
     * 是否兼职:
     */
    @ApiModelProperty("是否兼职")
    private String isPtJob;

    /**
     * 成员ID:
     */
    @ApiModelProperty("成员ID")
    private String memberId;

    /**
     * 身份角色ID:
     */
    @ApiModelProperty("身份角色ID")
    private String roleId;

    /**
     * 身份角色编码:
     */
    @ApiModelProperty("身份角色编码")
    private String roleCode;

    /**
     * 关系建立来源:
     */
    @ApiModelProperty("关系建立来源")
    private String source;

    /**
     * 主体生命周期:
     */
    @ApiModelProperty("主体生命周期")
    private String subjectLifeCycle;

    /**
     * 是否存档:
     */
    @ApiModelProperty("是否存档")
    private String isArchive;

    /**
     * 操作人就职记录ID:
     */
    @ApiModelProperty("操作人就职记录ID")
    private String operationInductionId;

    /**
     * 操作时间:
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;

    /**
     * 创建于空间ID:
     */
    @ApiModelProperty("创建于空间ID")
    private String spaceId;

    /**
     * 创建于联盟应用ID:
     */
    @ApiModelProperty("创建于联盟应用ID")
    private String appId;

    /**
     * 绑定手机
     */
    @ApiModelProperty("绑定手机")
    private String phone;

    /**
     * 是否异动 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否异动")
    private String isTransaction;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        BeginMemberDto that = (BeginMemberDto) o;
        return (
                originalRoleMemberId == that.originalRoleMemberId &&
                        userId == that.userId &&
                        idCardName == that.idCardName &&
                        nickName == that.nickName &&
                        positionIdName == that.positionIdName &&
                        userFace == that.userFace &&
                        firstLetter == that.firstLetter &&
                        isInvalid == that.isInvalid &&
                        roleMemberCode == that.roleMemberCode &&
                        isPtJob == that.isPtJob &&
                        memberId == that.memberId &&
                        roleId == that.roleId &&
                        roleCode == that.roleCode &&
                        source == that.source &&
                        subjectLifeCycle == that.subjectLifeCycle &&
                        isArchive == that.isArchive &&
                        operationInductionId == that.operationInductionId &&
                        operateTime == that.operateTime &&
                        spaceId == that.spaceId &&
                        appId == that.appId &&
                        phone == that.phone &&
                        isTransaction == that.isTransaction
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                originalRoleMemberId,
                userId,
                idCardName,
                nickName,
                positionIdName,
                userFace,
                firstLetter,
                isInvalid,
                roleMemberCode,
                isPtJob,
                memberId,
                roleId,
                roleCode,
                source,
                subjectLifeCycle,
                isArchive,
                operationInductionId,
                operateTime,
                spaceId,
                appId,
                phone,
                isTransaction
        );
    }
}
